	public function localizedFields()
	{ldelim}
		return array(
                'document_id',
                'document_uid',
				'document_author', 
				'document_creationdate', 
				'document_modificationdate', 
				'document_lang', 
				'document_revision', 
				'document_label', 
				'{$localizedFields}');
	{rdelim}
	
	public function nonLocalizedFields()
	{ldelim}
		return array(	'{$nonLocalizedFields}');
	{rdelim}
	
	/**
	 * Returns VO lang and translations langs
	 * @return array
	 */
	public function getAllLangs()
	{ldelim}
		$langs = $this->getTranslationLangs();
		array_unshift($langs, $this->getVO());
		return $langs;
	{rdelim}
	
	/**
	 * Returns all translations langs 
	 * @return array
	 */
	public function getTranslationLangs()
	{ldelim}
		$dbProvider = f_database_Provider::getInstance();
		
		$sql = "SELECT `document_lang` FROM ".$this->getTableName()."_i18n WHERE `document_uid`=:id";
		
		return $dbProvider->setQuery($sql)->execute(array("id" => $this->getUniqueId()))->getQueryResults(PDO::FETCH_COLUMN);
	{rdelim}
	
	/**
	 * Check if current document has at least one translation or a translation with the given lang
	 * @return boolean
	 */
	public function hasTranslation($lang = null)
	{ldelim}
		if(is_null($lang))
		{ldelim}
			return count($this->getTranslationLangs()) > 0;
		{rdelim}
		else
		{ldelim}
			return in_array(strtoupper($lang), $this->getTranslationLangs());
		{rdelim}
	{rdelim}

	/**
	 * Check if current document is translated or not
	 * @return boolean
	 */
	public function isTranslated()
	{ldelim}
		return $this->getPublicationstatus() != parent::NOTRANSLATION;
	{rdelim}

	/**
	 * Check if current document is a translation
	 * @return boolean
	 */
	public function isATranslation()
	{ldelim}
		return $this->getLang() != $this->getVO();
	{rdelim}
	
	/**
	 * Return the original document
	 * @return {$className}
	 */
	public function getVoDocument()
	{ldelim}
		if($this->isATranslation())
		{ldelim}
			return {$className}::getInstanceByUniqueId($this->getUniqueId(), $this->getVO());
		{rdelim}
		return $this;
	{rdelim}
	
	/**
	 * Return current document translation
	 * @return {$className}
	 */	
	public function getTranslation($lang)
	{ldelim}
		return {$className}::getInstanceByUniqueId($this->getUniqueId(), $lang);
	{rdelim}